package com.zhangtai.modules.service.salary;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhangtai.modules.dto.UserBankCardDto;
import com.zhangtai.modules.entity.salary.UserBankCardEntity;
import com.zhangtai.utils.PageResult;
import com.zhangtai.utils.R;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


/**
 * 员工银行卡 记录
 *
 * @author chenshun
 * @email sunlightcs@gmail.com
 * @date 2020-09-07 19:52:13
 */

public interface UserBankCardService {

    @GetMapping("/findUserBankCardList")
    @ApiOperation(value = "分页查询")
    PageResult queryPage(@RequestParam(value = "oid", required = false) String oid,
                         @RequestParam(value = "isPaycard", required = false) String isPaycard,
                         @RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
                         @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize);

    @ApiOperation(value = "分页查询")
    List<UserBankCardDto> getUserBankCardPage(@RequestParam(value = "orgIds",required = false) List<Long> orgIds,
                                              @RequestParam(value = "name", required = false) String name,
                                              @RequestParam(value = "code", required = false) String code,
                                              @RequestParam(value = "orgname", required = false) String orgname,
                                              @RequestParam(value = "unitname", required = false) String unitname,
                                              @RequestParam(value = "jobname", required = false) String jobname,
                                              @RequestParam(value = "stats",  defaultValue = "1") Integer stats,
                                              Page<UserBankCardDto> page) ;

    @GetMapping("/infoUserBankCard")
    @ApiOperation(value = "根据id查找")
    UserBankCardEntity getByIdE(@RequestParam("id") Long id);

    @PostMapping("/saveUserBankCard")
    @ApiOperation(value = "保存")
    R saveE(@RequestBody UserBankCardEntity entity);

    @PostMapping("/updateUserBankCard")
    @ApiOperation(value = "修改")
    R updateByIdE(@RequestBody UserBankCardEntity entity);

    @GetMapping("/deleteOneUserBankCard")
    @ApiOperation(value = "根据ID删除")
    R removeOneById(@RequestParam("id") Long id);

    @PostMapping("/deleteUserBankCards")
    @ApiOperation(value = "根据ID集合删除")
    R removeByIdsE(@RequestBody List<Long> ids);
}

